$OpenBSD: patch-src_Makefile,v 1.3 2017/04/23 19:02:14 espie Exp $
--- src/Makefile.orig	Tue Mar 19 02:58:57 2002
+++ src/Makefile	Sun Apr 23 21:00:33 2017
@@ -69,7 +69,7 @@ SYS_LDFLAGS = $(X11_LIBS) -lX11
 endif
 
 ifeq ($(TARGET),sdl)
-SYS_CFLAGS  = -DTARGET_SDL $(shell sdl-config --cflags)
+SYS_CFLAGS  = -DTARGET_SDL $(shell sdl-config --cflags) -fgnu89-inline
 SYS_LDFLAGS = -lSDL_image -lSDL_mixer $(shell sdl-config --libs)
 endif
 
@@ -112,7 +112,7 @@ ifdef BUILD_DIST				# distribution build
 OPTIONS = -O3 -Wall
 endif
 
-CFLAGS = $(OPTIONS) $(SYS_CFLAGS) $(CONFIG)
+CFLAGS += $(SYS_CFLAGS) $(EXTRA_CFLAGS) $(CONFIG)
 LDFLAGS = $(SYS_LDFLAGS) $(EXTRA_LDFLAGS) -lm
 
 
@@ -149,7 +149,7 @@ endif
 all: libgame_dir $(PROGNAME)
 
 $(PROGNAME): $(LIBGAME) $(OBJS) $(ICON)
-	$(CC) $(PROFILING) $(OBJS) $(ICON) $(LIBGAME) $(LDFLAGS) -o $(PROGNAME)
+	$(CC) $(CFLAGS) $(PROFILING) $(OBJS) $(ICON) $(LIBGAME) $(LDFLAGS) -o $(PROGNAME)
 
 libgame_dir:
 	@$(MAKE) -C $(LIBDIR)
